import request from '@/utils/request'

import {client} from '@/utils/tools'

//订单结算页
export function orderInfo(data) {
  return request.post("order/settlement", data);
} 
// 下单
export function orderBuy(data) {
  return request.post("order/submit_order", data);
} 
//删除订单
export function delOrder(id) {
    return request.post('order/del', {id})
}
//订单列表
export function getOrderList(data) {
    return request.get('order/lists', {params: data})
}
//订单详情
export function getOrderDetail(data) {
    return request.post('TransportOrder/info', data)
}

//取消订单
export function cancelOrder(data) {
    return request.post('TransportOrder/cancel', data)
}

//物流
export function orderTraces(id) {
    return request.get("order/orderTraces", {params: {id}})
}

//确认收货
export function confirmOrder(data) {
    return request.post("TransportOrder/affirmEnd", data)
}



// 支付结果
export function getPayResult(params) {
  return request.get("TransportOrder/payResult", { params });
} 

// 支付结果
export function getGoodsPayResult(params) {
  return request.get("order/pay_result", { params });
} 

// 追加小费
export function addTipCost(data) {
  return request.post("TransportOrder/addTipPrice",data);
} 

// 商品订单详细
export function getGoodsOrderDetail(id) {
   return request.get('order/getOrderDetail', {params: {id}})
} 

// 更换司机
export function changeDriver(data) {
   return request.post('TransportOrder/changeDriver', data)
} 

// 获取更换司机原因
export function changeReason(params) {
   return request.get('TransportOrder/reason',params)
} 
//获取搬运工的支付结果
export function getRemoverData(data){
	  return request.get('RemoverOrder/payResult', {data})
}
//添加长期订单
export function businessOrderadd(data){
	 return request.post('BusinessOrder/add', data)
}

//获取长期订单列表
export function businessOrderlist(data){
	 return request.post('/BusinessOrder/lists', data)
}
//获取长期订单
export function businessOrderdetails(data){
	 return request.post('BusinessOrder/details', data)
}
// 获取司机报价
export function businessOrderQuote(data){
	 return request.post('BusinessOrder/quote', data)
}
//确认司机所叫时间
export function businessOrderChoice(data){
	 return request.post('BusinessOrder/choice', data)
}